The present invention relates to transcoding and relates in particular to TTS (timestamped transport stream) transcoding technology.
Time stamps are attached to each packet when sending or storing content data obtained after multiplexing of compressed video data or audio data. Content data containing packets that were all given time stamps are called TTS or timestamped transport streams.
Time stamps are time information for controlling the read timing of the content data. Conventional TTS play devices such as disclosed in Japanese Unexamined Patent Application Publication No. 2008-263404, contain an internal counter that counts the reference clock pulses, compares the time stamp detached from the TTS, with the count value from the counter, and according to those comparison results, controls the timing at which the video data and audio data are output to the decoder.
There are a variety of standards known in the art for compressing video data and include MPEG2 (registered trademark), H.264, VC-1, etc. A decision on whether to compress video data contained within the content data based on one of the standards is made according to the particular application.
In a digital broadcast for example, the video data is often compressed by MPEG2 in applications for transmission systems that transfer content data along transmission paths; and video data is often compressed by H.264 or VC-1 in storage system applications that record the content data onto a recording medium such as a hard disk or optical disk.
Audio data is compressed in the same way according to the content data application based on the different standards.
When recording digital broadcasts for example, content data matching the transmission system application is converted to content data matching the storage system application. In this conversion, the multiplexed video data and audio data are separated from each other, and this video data or audio data or both are then decoded and recompressed by a separate standard, and utilized after remultiplexing.
Conversion is also carried out to reduce the size of the content data for example when copying a large volume of content data to a small capacity recording medium. In this conversion, the multiplexed video data and audio data are separated and this video data or audio data or both are then utilized by decoding, recompressing and then remultiplexing. Recompression may utilize a technique that recompressed the data to a different standard, or a technique that recompresses the data to a higher compression ratio in the same standard.
The process of decoding compressed video data or audio data and then recompressing the data to a separate standard or the same standard at a different compression ratio is called transcoding of the video data or audio data. Japanese Unexamined Patent Application Publication No. 2008-136187 for example disclosed technology for transcoding of MPEG2 video data into H.264 video data.
In the following description in this specification, the process of transcoding and remultiplexing either the audio data or video data or both that are contained in the content data is called content data transcoding or transcode processing.
Audio data and video data are processed separately during transcoding of content data so transcoding of video data and transcoding of audio data, and remultiplexing are usually performed by synchronization from the same clock (pulse).
Transcoding of video data or audio data changes the size and the number of packets in the video data or the audio data. Japanese Unexamined Patent Application Publication No. 2008-131570 discloses a technique for avoiding synchronizing errors (lip synch) during remultiplexing of transcoded video data or audio data when the number of packets has decreased due to smaller packet sizes caused by transcoding of the video data or the audio data. This technique is described while referring to FIG. 2 of Japanese Unexamined Patent Application Publication No. 2008-131570 (FIG. 5 in this specification).
In the technique in Japanese Unexamined Patent Application Publication No. 2008-131570, the TTS that was input is separated into video TTS packets and audio TTS packets, made into TTS packets after the respective transcoding processing to obtain TTS video and TTS audio, and is then remultiplexed.
When transcoding and TTS packetizing the video TTS packets for example, the same time stamp as when the TTS was input is still utilized. That process is described next.
This process detects the first PES (packetized elementary stream) packet from the video TTS, obtains the PES packet along with the collective TTS packet payload, and performs transcoding of the acquired PES packet to obtain the transcoding results. The process continues to still utilize the DTS (decoding time stamp) and PTS (presentation time stamp) within the PES packet header. The transcoding results are then overwritten onto the payload section of the TTS packet that was input. The data size of the post-transcoding is small compared to the pre-transcoding data so besides filling in the remaining areas by padding (P in the drawing), unneeded packets among the TTS packets are replaced with NULL packets (NULL in the figure). The above process in this way acquires the post-transcoding video TTS.
The process also transcodes the audio of the TTS packet in the same way to obtain a transcoded audio TTS. The process then compares the TTS that was input, with the time stamp of the post-transcoded audio and video TTS, and replaces the packet that matches the time stamp with the packet that was trans coded.
This technique retains unchanged both before and after transcoding, the same video and audio TTS packet stamps that were first input to prevent synchronization errors during remultiplexing. Moreover, the video data and audio data can be transcoded and remultiplexed asynchronously with no need to utilize the same clock.